package cn.exrick.xboot.supervisionDepartment.controller

import cn.exrick.xboot.base.dto.*
import cn.exrick.xboot.base.entity.*
import cn.exrick.xboot.base.vo.*
import cn.exrick.xboot.core.common.vo.PageVo
import cn.exrick.xboot.core.common.vo.Result
import io.swagger.annotations.Api
import io.swagger.annotations.ApiOperation
import lombok.extern.slf4j.Slf4j
import org.springframework.security.access.prepost.PreAuthorize
import org.springframework.web.bind.annotation.GetMapping
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestMapping
import javax.validation.Valid

@Slf4j
interface ISupervisionDepartmentController{


    @Api(tags = ["科室管理接口"])
    @RequestMapping("/xboot/administrativeOffice")
    interface IAdministrativeOffice{

        @GetMapping("/getByPage")
        @ApiOperation("分页获取")
        fun getByPage(pageVo: PageVo, administrativeOffice: AdministrativeOffice?): Result<MutableMap<String, Any?>>?

        @ApiOperation("创建或者更新科室")
        @PostMapping("/createOrUpdateOffice")
        fun createOrUpdateOffice(administrativeOffice: AdministrativeOffice?): Result<Any?>?

        @ApiOperation("移除科室")
        @PostMapping("/removeOffice")
        fun removeOffice(ids:Array<out String>): Result<Any?>?

        @PostMapping("/getOfficeVoList")
        @ApiOperation("根据条件或者科室列表")
        fun getOfficeVoList(): Result<MutableList<AdministrativeOfficeVo>?>?
    }

    @Api(tags = ["区域管理接口"])
    @RequestMapping("/xboot/area")
    interface IArea{

        @GetMapping("/getByParentId/{pid}")
        @ApiOperation("通过上级id获取区域数据")
        fun getByParentId(@PathVariable pid: String): Result<MutableList<Area?>>?

        @PostMapping("/add")
        @ApiOperation("添加区域")
        fun add(area: Area): Result<Any>?

        @PostMapping("/edit")
        @ApiOperation("编辑区域")
        fun edit(area: Area): Result<Any>?

        @PostMapping("/delByIds")
        @ApiOperation("删除区域")
        fun delByIds(vararg ids: String): Result<Any>

        @ApiOperation("查看区域详情")
        @GetMapping("/getAreaById/{id}")
        fun getAreaById(@PathVariable id: String): Result<Area>?

        @ApiOperation("获取统计区域")
        @PostMapping("/getAreaByAreaLevel")
        fun getAreaByAreaLevel():Result<MutableList<Area?>>?
    }

    @Api(tags = ["职务管理接口"])
    @RequestMapping("/xboot/duty")
    interface IDuty {

        @ApiOperation("创建或者更新职务")
        @PostMapping("createOrUpdateDuty")
        fun createOrUpdateDuty(duty: Duty): Result<Any?>?

        @ApiOperation("移除职务")
        @PostMapping("/removeDuty")
        fun removeDuty(ids:Array<out String>): Result<Any?>?

        @ApiOperation("获取同级职务")
        @PostMapping("/getByPage")
        fun getByPage(pageVo: PageVo, duty: Duty): Result<MutableMap<String, Any?>>?

        @ApiOperation("根据id获取职务名称")
        @PostMapping("/getDutyNameById")
        fun getDutyNameById(id: String?): String?

        @ApiOperation("根据条件或者职务列表")
        @PostMapping("/dutyVoList")
        fun dutyVoList(): Result<MutableList<DutyVo>?>?
    }

    @Api(tags = ["监管部门管理接口"])
    @RequestMapping("/xboot/supervision")
    interface ISupervisionUser{

        @PostMapping("/createSupervisionUser")
        @ApiOperation("创建监管部门用户")
        fun createSupervisionUser(@Valid supervisionUserDto: SupervisionUserDto): Result<Any?>?

        @PostMapping("/updateSupervisionUser")
        @ApiOperation("修改监管部门用户")
        fun updateSupervisionUser(@Valid supervisionUserDto: SupervisionUserDto): Result<Any?>?

        @PostMapping("/removeSupervisionUser")
        @ApiOperation("移除监管部门用户")
        fun removeSupervisionUser(vararg ids: String): Result<Any?>?

        @PostMapping("/getSupervisionUserList")
        @ApiOperation("获取监管部门用户列表")
        fun getSupervisionUserList(supervisionUserDto: SupervisionUserDto, pageVo: PageVo): Result<MutableMap<String, Any>>?

        @ApiOperation("启用或者禁用监管部门用户")
        @PostMapping("/forbiddenSupervisionUser")
        fun forbiddenSupervisionUser(vararg ids: String): Result<Any?>?

        @ApiOperation("获取监管部门个人信息(app)")
        @PostMapping("/getSupervisionInfo")
        fun getSupervisionInfo(): Result<SupervisionUserInfoVo?>?

        @ApiOperation("获取同级别考试监督员")
        @PostMapping("/getSupervisionExamByLevel")
        fun getSupervisionExamByLevel(areaId: String) : Result<List<UserCommonVo>>?

        @ApiOperation("获取同级别企业注册审核员")
        @PostMapping("/getSupervisionCheckByArea")
        fun getSupervisionCheckByArea(areaId: String): Result<List<UserCommonVo>>?

        @ApiOperation("重置账号密码")
        @PostMapping("/resetPassword")
        fun resetPassword(id: String): Result<Any>


        /*-------------------------------查询---------------------*/

        @ApiOperation("监管部门获取注册企业列表")
        @PostMapping("/getEnterpriseListByAreaId")
        fun getEnterpriseListByAreaId(enterpriseUserSearchDto: EnterpriseUserSearchDto, pageVo: PageVo?): Result<MutableMap<String, Any?>>?

        @ApiOperation("获取企业详情")
        @PostMapping("/getEnterpriseDetail")
        fun getEnterpriseDetail(id: String?): Result<EnterpriseUserDetailVo?>?

        @ApiOperation("监管部门获取安全顾问列表")
        @PostMapping("/getSecurityAdvisorByAreaId")
        fun getSecurityAdvisorByAreaId(securityAdvisorSearchDto: SecurityAdvisorSearchDto, pageVo: PageVo?): Result<MutableMap<String, Any?>>?

        @ApiOperation("获取安全顾问详情")
        @PostMapping("/getSecurityAdvisorDetail")
        fun getSecurityAdvisorDetail(id: String?): Result<SecurityAdvisorDetailVo?>?

    }

    @Api(tags = ["安全顾问管理接口"])
    @RequestMapping("/xboot/securityAdvisor")
    interface SecurityAdvisor{

        @ApiOperation("监管部门添加安全顾问(管理系统)")
        @PostMapping("createSecurityAdvisor")
        fun createSecurityAdvisor(securityAdvisorDto: SecurityAdvisorDto?): Result<Any?>?

        @ApiOperation("监管部门修改安全顾问(管理系统) && 安全手机端修改个人信息(app)")
        @PostMapping("/updateSecurityAdvisor")
        fun updateSecurityAdvisor(securityAdvisorDto: SecurityAdvisorDto): Result<Any?>?

        @ApiOperation("监管部门移除安全顾问(管理系统)")
        @PostMapping("/removeSecurityAdvisor")
        fun removeSecurityAdvisor(ids: Array<out String>?): Result<Any?>?

        @ApiOperation("监管部门禁用安全顾问(管理系统)")
        @PostMapping("/forbiddenSecurityAdvisor")
        fun forbiddenSecurityAdvisor(ids: Array<out String>?): Result<Any?>?

        @ApiOperation("监管部门(企业部门)获取安全顾问列表(管理系统)")
        @PostMapping("/securityAdvisorList")
        fun securityAdvisorList(pageVo: PageVo): Result<MutableMap<String, Any?>?>?
    }

    @Api(tags = ["事故案例管理接口"])
    @RequestMapping("/xboot/IAccidentCase")
    interface IAccidentCase{

        @ApiOperation("添加或者更新事故案例")
        @PostMapping("/createOrUpdateAccidentCase")
        fun createOrUpdateAccidentCase(accidentCase: AccidentCase): Result<Any?>?

        @ApiOperation("获取事故案例详情")
        @PostMapping("/getAccidentCaseDetail")
        fun getAccidentCaseDetail(id: String?) : Result<AccidentCaseVo?>?

        @ApiOperation("移除事故案例")
        @PostMapping("/removeAccidentCase")
        fun removeAccidentCase(ids: Array<out String>): Result<Any?>?

        @ApiOperation("获取事故案例列表")
        @PostMapping("/getAccidentCaseList")
        fun getAccidentCaseList(pageVo: PageVo, type: Int): Result<MutableMap<String, Any?>>?
    }


    @Api(tags = ["考场信息管理接口"])
    @RequestMapping("/xboot/IExamRoom")
    interface IExamRoom{

        @ApiOperation("添加或者更新考场信息管")
        @PostMapping("/createOrUpdateExamRoom")
        fun createOrUpdateExamRoom(examRoom: ExamRoom): Result<Any?>?


        @ApiOperation("移除考场信息")
        @PostMapping("/removeExamRoom")
        fun removeExamRoom(ids: Array<out String>): Result<Any?>?

        @ApiOperation("获取考场信息列表")
        @PostMapping("/getExamRoomList")
        fun getExamRoomList(pageVo: PageVo): Result<MutableMap<String, Any?>>?
    }

    @Api(tags = ["法律法规管理接口"])
    @RequestMapping("/xboot/ILawAndRegulations")
    interface ILawAndRegulations{

        @ApiOperation("添加或者更新考场法律法规")
        @PostMapping("/createOrUpdateLawAndRegulations")
        fun createOrUpdateLawAndRegulations(lawAndRegulations: LawAndRegulations): Result<Any?>?

        @ApiOperation("获取法律法规详情")
        @PostMapping("/getLawAndRegulationDetail")
        fun getLawAndRegulationDetail(id: String?): Result<LawAndRegulations?>?

        @ApiOperation("移除法律法规")
        @PostMapping("/removeAccidentCase")
        fun removeAccidentCase(ids: Array<out String>): Result<Any?>?

        @ApiOperation("获取法律法规列表")
        @PostMapping("/getAccidentCaseList")
        fun getAccidentCaseList(pageVo: PageVo): Result<MutableMap<String, Any?>>?
    }

    @Api(tags = ["公告管理接口"])
    @RequestMapping("/xboot/INotice")
    interface INotice{

        @ApiOperation("添加或者更新公告")
        @PostMapping("/createOrUpdateLawAndRegulations")
        fun createOrUpdateNotice(notice: Notice): Result<Any?>?

        @ApiOperation("移除公告")
        @PostMapping("/removeNotice")
        fun removeNotice(ids: Array<out String>): Result<Any?>?

        @ApiOperation("获取曝光信息或者公告信息")
        @PostMapping("/getNoticeDetail")
        fun getNoticeDetail(id: String) : Result<Notice>?

        @ApiOperation("获取公告列表")
        @PostMapping("/getNoticeList")
        fun getNoticeList(pageVo: PageVo, type: Int?): Result<MutableMap<String, Any?>>?
    }

    @Api(tags = ["我的上报管理接口"])
    @RequestMapping("/xboot/myReport")
    interface IMyReport {

        @ApiOperation("添加我的上报(员工)")
        @PostMapping("/createReport")
        fun createReport(myReport: MyReport): Result<Any?>?

        @ApiOperation("移除我的上报(员工)")
        @PostMapping("/removeReport")
        fun removeReport(id: String): Result<Any?>?

        @ApiOperation("我的上报列表(员工)")
        @PostMapping("/getMyReportList")
        fun getMyReportList(pageVo: PageVo): Result<MutableMap<String, Any?>>?

        @ApiOperation("获取我的上报详情(员工&&监管部门)")
        @PostMapping("/getMyReportDetail")
        fun getMyReportDetail(id: String): Result<MyReportDetailVo>?

        @ApiOperation("监管部门获取待处理上报信息(监管部门)")
        @PostMapping("/getSupervisionPreCheckRePort")
        fun getSupervisionPreCheckRePort(pageVo: PageVo): Result<MutableMap<String, Any?>>?

        @ApiOperation("监管部门获取已经处理上报信息(监管部门)")
        @PostMapping("/getSupervisionHaveCheckReport")
        fun getSupervisionHaveCheckReport(pageVo: PageVo): Result<MutableMap<String, Any?>>?

        @ApiOperation("监管部门处理上报信息")
        @PostMapping("/resolveReport")
        fun resolveReport(myReportDto: MyReportDto): Result<Any?>?
    }

}